<?php

/*
-----------------------------------------------------------------
Определение WAP или WEB   
-----------------------------------------------------------------
*/
$userskin = $set_user['webskin'];
   
if (isset($_COOKIE['the']))
 {
    $the = $_COOKIE['the'];
    $wapdet = $the; 

if ($the=="web")
 {
   $$userskin = $set_user['webskin'];
 } else {
    $userskin = $set_user['wapskin'];
 }
 
 } else
 {
   if (!$is_mobile) {
    $wapdet == "web";
   	$userskin = $set_user['webskin'];
	} else {
     $wapdet == "wap";
     $userskin = $set_user['wapskin'];
	}
 }	
 
$set_user['skin'] = $userskin; 

/*
-----------------------------------------------------------------
Вывод шапки 
-----------------------------------------------------------------
*/	

$filename =  $_SERVER['DOCUMENT_ROOT']. '/theme/' . $userskin . '/head.php';

if (file_exists($filename)) 
 { 
	require_once ($rootpath . 'theme/' . $userskin . '/head.php'); 
 } 
else 
 { 
	require_once ($rootpath . 'pages/head.php'); 
 }
?>